package com.xy.stock.config;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyBoothandlerIntercepter implements HandlerInterceptor {
    //    在请求被处理之前执行的逻辑，可以通过返回值决定是否继续处理请求。
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println(request.getHeader("xy"));
        return true;
    }
}
